//指定中文输出编码
phantom.outputEncoding="GBK";

var casper = require('casper').create();

casper.start('https://www.baidu.com',function(){
	var text = "设计股份(603018)";
	var stock_name = text.substring(0,text.indexOf('('));
	var stock_code = text.substring(text.indexOf('(')+1,text.indexOf(')'));
	this.echo(stock_name);
	this.echo(stock_code);

});

casper.run();